// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_SALES_APPROVED_FEE
// * CreateDate    : 2011/11/21 10:37:36
// * Creater       : CodeSmith
// * LastChangeDate: 2011/11/21 10:37:36
// * LastChanger   : 2011/11/21 10:37:36
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class SalesApprovedFeeEntity : EntityBase
    {
        public SalesApprovedFeeTable TableSchema
        {
            get
            {
                return SalesApprovedFeeTable.Current;
            }
		}
		
		public SalesApprovedFeeEntity()
        {

        }
		
		public SalesApprovedFeeEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.FeeId = Convert.ToString(CommonFunctions.ToObject(dr["FEE_ID"]));
			this.SalesFeeId = Convert.ToString(CommonFunctions.ToObject(dr["SALES_FEE_ID"]));
			this.PersonId = Convert.ToString(CommonFunctions.ToObject(dr["PERSON_ID"]));
			this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
			this.StartDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["START_DATE"]));
			this.EndDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["END_DATE"]));
			this.ApprovedAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["APPROVED_AMOUNT"]));
        }
		
		public SalesApprovedFeeEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.FeeId = Convert.ToString(CommonFunctions.ToObject(dr["FEE_ID"]));
			this.SalesFeeId = Convert.ToString(CommonFunctions.ToObject(dr["SALES_FEE_ID"]));
			this.PersonId = Convert.ToString(CommonFunctions.ToObject(dr["PERSON_ID"]));
			this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
			this.StartDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["START_DATE"]));
			this.EndDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["END_DATE"]));
			this.ApprovedAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["APPROVED_AMOUNT"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return SalesApprovedFeeTable.Current;
            }
        }
		
		#region Perporty List
        public string FeeId
        {
            get { return Convert.ToString(GetData(SalesApprovedFeeTable.C_FEE_ID)); }
            set { SetData(SalesApprovedFeeTable.C_FEE_ID, value); }
        }
		
        public string SalesFeeId
        {
            get { return Convert.ToString(GetData(SalesApprovedFeeTable.C_SALES_FEE_ID)); }
            set { SetData(SalesApprovedFeeTable.C_SALES_FEE_ID, value); }
        }
		
        public string PersonId
        {
            get { return Convert.ToString(GetData(SalesApprovedFeeTable.C_PERSON_ID)); }
            set { SetData(SalesApprovedFeeTable.C_PERSON_ID, value); }
        }
		
        public string CustomerId
        {
            get { return Convert.ToString(GetData(SalesApprovedFeeTable.C_CUSTOMER_ID)); }
            set { SetData(SalesApprovedFeeTable.C_CUSTOMER_ID, value); }
        }
		
        public DateTime StartDate
        {
            get { return Convert.ToDateTime(GetData(SalesApprovedFeeTable.C_START_DATE)); }
            set { SetData(SalesApprovedFeeTable.C_START_DATE, value); }
        }
		
        public DateTime EndDate
        {
            get { return Convert.ToDateTime(GetData(SalesApprovedFeeTable.C_END_DATE)); }
            set { SetData(SalesApprovedFeeTable.C_END_DATE, value); }
        }
		
        public decimal ApprovedAmount
        {
            get { return Convert.ToDecimal(GetData(SalesApprovedFeeTable.C_APPROVED_AMOUNT)); }
            set { SetData(SalesApprovedFeeTable.C_APPROVED_AMOUNT, value); }
        }
		
		#endregion
	}
	
	
}	

